package control;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

/**
 * 全局的鼠标监听器 主要负责的是拖动节点,按钮点击事件不使用此监听器
 * 
 * @author raymondwong
 *
 */
public class MouseControl extends MouseAdapter {

  private AmControl amControl = null;

  public MouseControl(AmControl amControl) {
    this.amControl = amControl;
  }

  /**
   * 鼠标按下事件
   */
  public void mousePressed(MouseEvent e) {
    this.amControl.mousePress(e);
  }

  /**
   * 鼠标松开事件
   */
  public void mouseReleased(MouseEvent e) {
    this.amControl.mouseReleased(e);
  }

  /**
   * 鼠标移动事件
   */
  public void mouseMoved(MouseEvent e) {
    this.amControl.mouseMoved(e);
  }
}
